package com.cn.auth.serviceImpl.census;

import com.cn.auth.dao.census.CensusDao;
import com.cn.auth.service.census.CensusService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;

@Service
public class CensusServiceImpl implements CensusService {
	@Resource
	CensusDao sensusDao;

	@Override
	public Map<String, Integer> getCensusMap() {
		Map<String, Integer> map = new HashMap<>();
		map.put("blogCount",sensusDao.getBlogCount());
		map.put("commentCount",sensusDao.getCommentCount());
		map.put("roleCount",sensusDao.getRoleCount());
		map.put("userCount",sensusDao.getUserCount());
		return map;
	}

	@Override
	public Map<String, Object> getCensusUserMap() {
		Map<String, Object> map = new HashMap<>();
		map.put("visitRateMap",sensusDao.getUserVisitRate());
		return map;
	}
}
